from kafka import KafkaProducer

producer = KafkaProducer(bootstrap_servers = 'localhost:9092')
for i in range(10):
    producer.send('2206', str(i).encode('utf-8'))
producer.flush()